<%--
  Created by IntelliJ IDEA.
  User: LT
  Date: 2018-10-26
  Time: 10:52
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <link rel="stylesheet" href="bootstrap/css/bootstrap.css">
    <link rel="stylesheet" href="date/bootstrap-datetimepicker.min.css">
    <script src="bootstrap/jquery-3.2.1.min.js"></script>
    <script src="bootstrap/js/bootstrap.js"></script>
    <script src="date/Moment.js"></script>
    <script src="date/bootstrap-datetimepicker.min.js"></script>
    <style>
        body{
            padding:30px
        }
    </style>
</head>
<body>
<form action="" method="post" class="form-inline" role="form">
    <div class="form-group">
        <label for="x">选择日期：</label>
        <div class="input-group" id="datetimepicker1">
            <input name="x" type='text' class="form-control" />
            <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>
        </div>

    </div>

</form>


<script>
    $(function () {
        $('#datetimepicker1').datetimepicker({
            format: 'YYYY-MM-DD',
            locale: moment.locale('zh-cn')
        });
        $('#datetimepicker2').datetimepicker({
            format: 'YYYY-MM-DD hh:mm',
            locale: moment.locale('zh-cn')
        });
    });

</script>


</body>
</html>
